﻿using System.ComponentModel.DataAnnotations;

namespace wwl.Contract.Dtos.Requests.Rbac
{
  /// <summary>
  /// 创建用户请求模型
  /// </summary>
  public class CreateUserRequest
  {
    [Required(ErrorMessage = "用户名不能为空")]
    [StringLength(64, ErrorMessage = "用户名长度不能超过64个字符")]
    public string Username { get; set; } = string.Empty;

    [Required(ErrorMessage = "密码不能为空")]
    [StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度必须在6-100个字符之间")]
    public string Password { get; set; } = string.Empty;

    [Required(ErrorMessage = "用户全名不能为空")]
    [StringLength(128, ErrorMessage = "用户全名长度不能超过128个字符")]
    public string FullName { get; set; } = string.Empty;

    [EmailAddress(ErrorMessage = "邮箱格式不正确")]
    [StringLength(128, ErrorMessage = "邮箱长度不能超过128个字符")]
    public string? Email { get; set; }

    [StringLength(32, ErrorMessage = "电话长度不能超过32个字符")]
    public string? Phone { get; set; }

    [StringLength(500, ErrorMessage = "备注信息长度不能超过500个字符")]
    public string? Remarks { get; set; }
  }
}